package com.gzhu.knowledgeAdmin.controller;


import com.gzhu.knowledgeAdmin.common.result.R;
import com.gzhu.knowledgeAdmin.common.vo.RecorderVo;
import com.gzhu.knowledgeAdmin.entity.Recorder;
import com.gzhu.knowledgeAdmin.service.RecorderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping
public class RecorderController {

    @Autowired
    private RecorderService recorderService;

    @GetMapping("/template/recorder/list")
    public R getRecorder() {

        List<RecorderVo> recorderList = recorderService.getRecorderList();

        return R.ok(recorderList);
    }

    @PostMapping("/template/recorder/update")
    public R updateRecorder(@RequestBody Recorder recorder) {

        recorderService.updateRecorder(recorder);

        return R.ok();
    }
}
